  	<div id="replyitem">
  	<div class="round-top tb_title_bg_color" id="requestlist_title">申请交换的物品：</div>
  	<div id="requestlist_contant">
  	<ul class='request_list_view'>
  	<li class='request_list_item title_ft'>
  	<div class='item_title'>物品</div>
  	<div class='item_request_time_800'>申请时间</div>
  	<div class='item_owner_800'>用户</div>
  	<div class='item_status'>状态</div>
  	</li>
<?php
global $trans_ok;
  $sql="select exc_transaction.createtime,exc_transaction.id,exc_transaction.status,exc_goods.id as goods_id,exc_goods.title,exc_goods.user_id from exc_goods,exc_transaction where exc_transaction.status<>3 AND exc_transaction.goods_id2=".$_GET["id"]." AND exc_transaction.goods_id1=exc_goods.id";
  $res=mysql_query($sql);
  if(!$res){
    echo mysql_error();
    exit;
  }
  while($row=mysql_fetch_array($res)) {
  	echo "<li class='request_list_item'>";
  	echo "<div class='item_title'>";
    echo  "<a href='".get_app_page_url("exchange","item")."&id=".$row["goods_id"]."'>".$row["title"]."</a>";
    echo "</div>";
    echo "<div class='item_request_time_800'>".$row["createtime"]."</div>";
    echo "<div class='item_owner_800'>".get_user_name_by_id($row["user_id"])."</div>";
    echo "<div class='item_status'>";
    if($row["status"]==2){
     echo "交易已被接受";
    }elseif($trans_ok){
      echo "交易已结束";
    }else{
      echo "<input type='button' name='".$row["id"]."' class='delete_button' value='删除'>";
    }
    echo "</div>";
    echo "</li>";
  }
?>
  	</ul>
  	</div>
  	</div>